]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
magnifier: Invalidate content size when it changes
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 11 Mar 2019 20:40:45 +0000 (16:40 -0400)
committerMarco Trevisan (Treviño) <mail@3v1n0.net>
Mon, 1 Apr 2019 20:34:44 +0000 (16:34 -0400)
In case the content size changes we need to invalidate its size in order to
trigger a full actor relayout.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/443

js/ui/magnifier.js

index 3d05615eecbdbe134e0b2af5e4d2fe86eeaf1764..f6b0e955022c0917300a6099453aece5dc33457b 100644 (file)
@@ -84,8 +84,14 @@ var MouseSpriteContent = GObject.registerClass({
         if (this._texture == coglTexture)
             return;
 
+        let oldTexture = this._texture;
         this._texture = coglTexture;
         this.invalidate();
+
+        if (!oldTexture ||
+            oldTexture.get_width() != coglTexture.get_width() ||
+            oldTexture.get_height() != coglTexture.get_height())
+            this.invalidate_size();
     }
 });